package com.grape.dto;

import com.grape.domain.Account;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

@Data
public class ElectronicAccountDTO {

    /** 账户id */
    @ApiModelProperty(value = "账户id")
    private String id;

    /** 账户图标 */
    @ApiModelProperty(value = "账户图标")
    private String icon;

    /** 账户颜色 */
    @ApiModelProperty(value = "账户颜色")
    private String color;

    /** 账户名称 */
    @ApiModelProperty(value = "账户名称")
    private String name;

    public void initByAccount(Account account) {
        this.setId(account.getId());
        this.setIcon(account.getIcon());
        this.setColor(account.getColor());
        this.setName(account.getName());
    }

}
